package com.fan.demo01;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

//@Configuration
//@ComponentScan
@Import({UserService.class})
public class JavaConfig {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext acp = new AnnotationConfigApplicationContext(JavaConfig.class);
        System.out.println(acp.getBean(UserService.class));

    }
}
